compose: Generate endian-dependent compact Compose data
authorSimon McVittie <smcv@debian.org>
Mon, 30 Aug 2021 09:13:33 +0000 (10:13 +0100)
committerSimon McVittie <smcv@debian.org>
Mon, 30 Aug 2021 10:29:46 +0000 (11:29 +0100)
commit52cdf3056d86c7dd46517bcf37cf36dd511d4252
tree9e54865482bb6404117d48421cb8e28f94b498ab
parent2db8d7f6a2b225d801d443618143d7dff3ba9cf4
compose: Generate endian-dependent compact Compose data

The GtkComposeTable cache is always in big-endian format and is
byteswapped on load for the more common little-endian CPUs, but
init_builtin_table() in GtkIMContextSimple can't byteswap the built-in
data without copying it, which is undesirable. Pregenerate both big-
and little-endian compose data, and compile the correct flavour into
each build of GTK. This fixes failure of the composetable test when
building for a big-endian architecture such as s390x and (traditional,
big-endian) powerpc.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217
Signed-off-by: Simon McVittie <smcv@debian.org>
gtk/compose/compose-parse.c
gtk/compose/sequences [deleted file]
gtk/compose/sequences-big-endian [new file with mode: 0644]
gtk/compose/sequences-little-endian [new file with mode: 0644]
gtk/gen-gtk-gresources-xml.py
gtk/meson.build